// 预览图片

function previewImage(url) {
    let img = document.createElement('img');
    img.src = url;
    img.classList.add('previewImage')
    img.style = `
        width:100%;
        height:100vh;
        object-fit:contain;
        position:fixed;
        top:0;
        left:0;
        z-index:2100;
        background:#000;
    `
    img.onclick = () => {
        document.body.removeChild(img);
    }
   
    document.body.appendChild(img);
}

export default previewImage;